<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02 变量与常量</title>
</head>
<body>
<!--  js是一门若类型的语言-->

<script>
    var a = 1;
    console.log(a)
    var b = 3.14
    console.log(b)

    var c = true
    console.log(c)
    c=false

    console.log(c)


    c = '今天星期一！'
    console.log(c)


//     使用let关键字来声明变量  不可重复声明
    let x = 11
    console.log(x)

    // 报错 02_.html:31 Uncaught SyntaxError: Identifier 'x' has already been declared
    // let x = 22
    // console.log(x)

//     常量 const
    const y = 2
    console.log(y)
    // 值不可修改
    // y = 3




</script>



</body>
</html>